<?php
class CategoryHideAction extends AdminAction
{
	public function __construct()
	{
		parent::__construct();
		$this->responseType = 'json';
	}

	public function execute()
	{
		$categoryService = new CategoryService();
		$id = $this->context->get('id');
		$hide = $this->context->get('hide');
		if(is_numeric($id) && $id)
		{
			$categoryService->hideCategory($id, $hide);
		}
		
		$this->code = 200;
	}
}
